<?php
require_once("Elements.php");
		
class PasswordResetForm extends Zend_Form {
	
	public function init() {
		$this->setMethod('POST');
		$element = new Zend_Form_Element_Password('password');
		$element->setLabel('新密码:');
		$element->setRequired(true);
		$element->addValidator(new Zend_Validate_StringLength(6,20));
		$this->addElement($element);
		
		$element = new Zend_Form_Element_Password('password_confirm');
		$element->setLabel('确认密码:');
		$element->setDescription('再次输入您的密码以确认');
		$element->setRequired(true);
		$element->addPrefixPath('My_Validate', 'My/Validate', 'validate');
		$element->addValidator('PasswordConfirmation', true); 
		$this->addElement($element);
		
		$element = new Zend_Form_Element_Submit('ok');
		$element->setValue('确定');
		$this->addElement($element);
	}
}
?>